﻿<%@ Page Title="Register" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Register.aspx.cs" Inherits="RLAWEB.Account.Register" %>

<asp:Content runat="server" ID="BodyContent" ContentPlaceHolderID="MainContent">
    <h2><%: Title %>.</h2>
    <p class="text-danger">
        <asp:Literal runat="server" ID="ErrorMessage" />
    </p>

    <div class="form-horizontal">
        <h4>Opret ny bruger.</h4>
        <hr />
        <asp:ValidationSummary runat="server" CssClass="text-danger" />
        <div class="form-group">
            <asp:Label runat="server" AssociatedControlID="UserName" CssClass="col-md-2 control-label">Profilnavn</asp:Label>
            <div class="col-md-10">
                <asp:TextBox runat="server" ID="UserName" CssClass="form-control" />
                <asp:RequiredFieldValidator runat="server" ControlToValidate="UserName"
                    CssClass="text-danger" ErrorMessage="Profilnavn er påkrævet." />
            </div>
        </div>
        <div class="form-group">
            <asp:Label runat="server" AssociatedControlID="ValidateEmail" CssClass="col-md-2 control-label">E-mail</asp:Label>
            <div class="col-md-10">
                <asp:TextBox runat="server" ID="txtMail" CssClass="form-control" />
                <asp:RequiredFieldValidator runat="server" ControlToValidate="txtMail"
                    CssClass="text-danger" ErrorMessage="E-mail er påkrævet." />
                <asp:RegularExpressionValidator ID="ValidateEmail" runat="server" CssClass="text-danger" 
                    ValidationExpression="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" ErrorMessage="E-mail skal være valid." 
                    ControlToValidate="txtMail" Display="Dynamic"></asp:RegularExpressionValidator>
                
            </div>
        </div>
        <div class="form-group">
            <asp:Label runat="server" AssociatedControlID="txtFName" CssClass="col-md-2 control-label">Fornavn</asp:Label>
            <div class="col-md-10">
                <asp:TextBox runat="server" ID="txtFName" CssClass="form-control" />
                <asp:RequiredFieldValidator runat="server" ControlToValidate="txtFName"
                    CssClass="text-danger" ErrorMessage="Fornavn er påkrævet." />
            </div>
        </div>

        <div class="form-group">
            <asp:Label runat="server" AssociatedControlID="txtLName" CssClass="col-md-2 control-label">Efternavn</asp:Label>
            <div class="col-md-10">
                <asp:TextBox runat="server" ID="txtLName" CssClass="form-control" />
                <asp:RequiredFieldValidator runat="server" ControlToValidate="txtLName"
                    CssClass="text-danger" ErrorMessage="Efternavn er påkrævet." />
            </div>
        </div>
        

        <div class="form-group">
            <asp:Label runat="server" AssociatedControlID="Password" CssClass="col-md-2 control-label">Password</asp:Label>
            <div class="col-md-10">
                <asp:TextBox runat="server" ID="Password" TextMode="Password" CssClass="form-control" />
                <asp:RequiredFieldValidator runat="server" ControlToValidate="Password"
                    CssClass="text-danger" ErrorMessage="Password er påkrævet." />
            </div>
        </div>
        <div class="form-group">
            <asp:Label runat="server" AssociatedControlID="ConfirmPassword" CssClass="col-md-2 control-label">Bekræft password</asp:Label>
            <div class="col-md-10">
                <asp:TextBox runat="server" ID="ConfirmPassword" TextMode="Password" CssClass="form-control" />
                <asp:RequiredFieldValidator runat="server" ControlToValidate="ConfirmPassword"
                    CssClass="text-danger" Display="Dynamic" ErrorMessage="Bekræft password er påkrævet." />
                <asp:CompareValidator runat="server" ControlToCompare="Password" ControlToValidate="ConfirmPassword"
                    CssClass="text-danger" Display="Dynamic" ErrorMessage="Password er ikke ens." />
            </div>
        </div>
        
        <div class="form-group">
            <asp:Label runat="server" AssociatedControlID="rdSex" CssClass="col-md-2 control-label">Køn</asp:Label>
            <div class="col-md-10">
                <asp:RadioButtonList ID="rdSex" runat="server" RepeatDirection="Horizontal" RepeatLayout="Table"  CellSpacing="10" CellPadding="7">
                    <asp:ListItem Text=" Mand" Value="M"> </asp:ListItem>
                    <asp:ListItem Text=" Kvinde" Value="F"></asp:ListItem>
                    
                </asp:RadioButtonList>
                <asp:RequiredFieldValidator runat="server" ControlToValidate="rdSex"
                    CssClass="text-danger" ErrorMessage="Køn er påkrævet." />
            </div>
        </div>
        
        <div class="form-group">
            <div class="col-md-offset-2 col-md-10">
                <asp:Button runat="server" OnClick="CreateUser_Click" Text="Register" CssClass="btn btn-default" />
            </div>
        </div>
    </div>
</asp:Content>
